import java.util.Scanner;


public class Main {

	static Scanner scan;
	static long cycLength(long num){
		long count=1;
		while(true){
			if(num==1){
				return count;
			}
			if(num%2==0){
				num/=2;
			}else{
				num=num*3+1;
			}
			count++;
		}
		
	}
	public static void main(String[] args) {
		int start,end;
		long max=0,tmp;
		scan = new Scanner(System.in);
		//scan = new Scanner("1 10 100 200 201 210 900 1000");
		while(scan.hasNext()){
			max = 0;
			start = scan.nextInt();
			end = scan.nextInt();
			for(long i=start;i<=end;i++){
				tmp = cycLength(i);
				if(max<tmp){
					max = tmp;
				}
			}
			System.out.println(start+" "+end+" "+max);
		}
	}

}
